#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QMediaPlayer>
#include <QVideoWidget>
#include <QAudioOutput>
#include <QDebug>
#include <QPushButton>
#include <QFileDialog>

QT_BEGIN_NAMESPACE
namespace Ui {
class Widget;
}
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();

protected:
    void paintEvent(QPaintEvent* event);

private slots:


    void on_openBtn_clicked();

    void on_backwardBtn_clicked();

    void on_beginBtn_clicked();

    void on_forwardBtn_clicked();

    void on_voiceSlider_valueChanged(int value);

    void on_videoSlider_valueChanged(int value);

    void on_comboBox_currentTextChanged(const QString &arg1);

    void on_videoSlider_sliderPressed();

    void on_videoSlider_sliderReleased();

private:
    Ui::Widget *ui;
    QMediaPlayer* m_player = nullptr;
    QVideoWidget* m_widget = nullptr;
    QAudioOutput* m_audioOutput = nullptr;
    bool isPlaying = false;
};
#endif // WIDGET_H
